/**
 * 生成 UUID
 * @returns 生成的 UUID 字符串
 */
export function generateUUID(): string {
  let d = new Date().getTime();
  return "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g, (c) => {
    const r = (d + Math.random() * 16) % 16 | 0;
    d = Math.floor(d / 16);
    return (c === "x" ? r : (r & 0x3 | 0x8)).toString(16);
  });
}
export default generateUUID;
